package cn.com.nio;

import java.io.IOException;
import java.nio.channels.SelectionKey;

public class NIOServerHolder implements Holder{
	private int port;
	private NIOServerListener serverListener;

	public NIOServerHolder(int port, NIOServerListener serverListener) {
		super();
		this.port = port;
		this.serverListener = serverListener;
	}

	public int getPort() {
		return port;
	}

	public NIOServerListener getFactory() {
		return serverListener;
	}

	@Override
	public void checkTimeOut() {}

	@Override
	public int getInterestOps() throws IOException {
		return SelectionKey.OP_ACCEPT;
	}

	@Override
	public void handleException(Exception e) {}

	@Override
	public void close() throws IOException {
		
	}

	
}
